package com.example.aidocengine.common.result;

import lombok.Getter;

@Getter
public enum ResultCode {
    SUCCESS(200, "操作成功"),
    ERROR(500, "操作失败"),
    PARAM_ERROR(400, "参数错误"),
    NOT_FOUND(404, "资源不存在"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    
    // 业务错误码
    FILE_UPLOAD_ERROR(1001, "文件上传失败"),
    FILE_NOT_FOUND(1002, "文件不存在"),
    FILE_PARSE_ERROR(1003, "文件解析失败"),
    DOCUMENT_PARSE_ERROR(1004, "文档解析失败"),
    DEVICE_IMPORT_ERROR(1005, "设备导入失败"),
    TERMINOLOGY_VALIDATION_ERROR(1006, "术语验证失败"),
    VALIDATION_RULE_NOT_FOUND(1007, "验证规则不存在"),
    DEVICE_TEMPLATE_ERROR(1008, "设备模板错误"),
    STARTUP_PLAN_VALIDATION_ERROR(1009, "启动方案校验失败");

    private final Integer code;
    private final String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}